<?php
session_start();
?>
<head>
    <link rel="stylesheet" href="napfa.css"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>NAPFA System</title>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <?php include 'CSSFunction.php'; ?>
</head>

<body onload="MM_preloadImages('Image/4.jpg','Image/Picture2hove.jpg','Image/Picture3hove.jpg','Image/welcome_graphic3hove.jpg','Image/OliveHOvber.jpg')">
    <div class="Wrapper" id="Wrapper">
        <center>
            <?php
            include 'Header.php';
            require_once 'Function.php';
            include 'Banner.php';            
            ?>
            <?php
            $submiteed = $_POST['formatsubmitted'];
            $user = $_POST['username'];
            $password = sha1($_POST['password']);
            if ($submiteed) {
                LoginIn($user, $password);
            }
            include 'CheckLogin.php';
            ?>
            <div id="apDiv21">
                <p align="left">National Physical Fitness Assessment (NAPFA)</p>
            </div>
            <div id="apDiv23"><img src="Images/horizontalLine.jpg" width="400" height="1" />
            </div>
            <div id="apDiv26">
                <b><p align="left" >You have successfully logged in to the system.</p></b>
                <p align="left">Welcome,<?php echo $_SESSION['userid']; ?></p>
                <p align="left">Click on the services available below to continue</p>
            </div>
            <div id="apDiv24">
                <label>
                    <div class="AnnouncementLabel">
                        <p align="left"><b>Announcement Panel</b></p>
                        <p align="left"><img src="Images/horizontalLine.jpg" width="400" height="1" /></p> 
                    </div>
                </label>
            </div>

            <div id="apDiv34" <?php
            if (($_SESSION['role']) == 'lecturer' || ($_SESSION['role']) == 'student') {
                echo 'style="display: none"';
            }
            ?>>
                <p><a href="CreateNewLec.php"><img src="Images/add.PNG" width="112" height="100" /></a></p>
                <p>Add Lecturer</p>
            </div>

            <div id="apDiv35" <?php
            if (($_SESSION['role']) == 'lecturer' || ($_SESSION['role']) == 'student') {
                echo 'style="display: none"';
            } else {
                echo '';
            }
            ?>>
                <p><img src="Images/edit.PNG" width="112" height="100" /></p>
                <p>Manage Lecturer Account</p>
            </div>

            <div id="apDiv31" <?php
            if (($_SESSION['role']) == 'sadmin' || ($_SESSION['role']) == 'student') {
                echo 'style="display: none"';
            } else {
                echo '';
            }
            ?>>
                <p><img src="Images/announcemnent icon.jpg" width="112" height="100"/></p>
                <p>Manage Annoucement Panels</p>
            </div>

            <div id="apDiv32" <?php
            if (($_SESSION['role']) == 'sadmin' || ($_SESSION['role']) == 'student') {
                echo 'style="display: none"';
            } else {
                echo '';
            }
            ?>>
                <p><img src="Images/award.PNG" width="112" height="100" /></p>
                <p>Manage Students Results</p>
            </div>

            <div id="apDiv33" <?php
            if (($_SESSION['role']) == 'sadmin' || ($_SESSION['role']) == 'student') {
                echo 'style="display: none"';
            } else {
                echo '';
            }
            ?>>
                <p><img src="Images/faqs.jpg" width="112" height="100" /></p>
                <p>Manage Frequently Asked Questions (FAQ)</p>
            </div>

            <div id="apDiv30" <?php
            if (($_SESSION['role']) == 'sadmin' || ($_SESSION['role']) == 'student') {
                echo 'style="display: none"';
            } else {
                echo '';
            }
            ?>>
                <p><img src="Images/ms-office-2007-beta-2-excel.png" width="112" height="100" /></p>
                <p>Manage Imported Spreadsheet Data</p>
            </div>

            <div id="apDiv36" <?php
            if (($_SESSION['role']) == 'sadmin' || ($_SESSION['role']) == 'lecturer') {
                echo 'style="display: none"';
            } else {
                echo '';
            }
            ?>>
                <p><img src="Images/studentAward.jpg" width="112" height="100" /></p>
                <p>Check Results</p>
            </div>

            <?php
            include 'SideNavigation.php';
            include 'Footer.php';
            ?>

        </center>
    </div>
    <script type="text/javascript">
        var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
    </script>
</body>